package network.course3;

public class RunableTest implements Runnable{
    @Override
    public void run() {
            System.out.println("名称"+Thread.currentThread().getName()+"号码"+(int)(Math.random()*9+1));
        try {
            Thread  .sleep(200);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
       // System.out.println(Thread.currentThread().getName()+"睡眠结束");
    }

    public static void main(String[] args) {
        RunableTest runableTest=new RunableTest();
        Thread r=new Thread(runableTest);
        r.setName("钱三一");
        r.start();
        Thread r2=new Thread(runableTest);
        r2.setName("林妙妙");
        r2.start();
    }
}
